<% 
  p_id = "edit_image_" + image.id.to_s
  author = image.author.to_s
  category_id = ResourceCategory::IMAGE[:id]
%>
<tr class="resource_cell" onmouseover="setVisibility('<%= p_id %>', true)" onmouseout="setVisibility('<%= p_id %>', false)" >
  <td class="for_rbtn" >
    <%= image_tag "resources/image_icon.gif" %>
    <p id="<%= p_id %>" >
      <% if can_edit_resources?(image) -%>
        <%= link_to_remote image_tag('left_edit.gif'), 
          :update => "edit_resource", 
          :url => {:action => :edit_file, :id => image, :category_id => category_id},
          :after => "onEditResource()" %>
      <% end -%>
    </p>
  </td>
  <td>
    <p class="link" ><%= link_to image.url.split("/").last, url_for_file_column(image, :url) %></p>
    <p class="description" ><%= image.description %></p>
    <p class="info" >
      <%= format_bytes(File.size(image.url)) %> by <%= author.strip.empty? ? "unknown" : author %>
      <% if can_delete_resources?(image) -%>
        <%= link_to image_tag('resources/remove_resource.gif'), 
          {:action => :remove_resource, :id => image, :category_id => category_id}, 
          :confirm => "Are you sure?" %>
      <% end -%>
    </p>
  </td>
</tr>